﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using MusicStore.Silverlight.Infrastructure;

namespace Structura.Silverlight.Infrastructure.Navigation
{
	/// <summary>
	/// this is the only object that knows something about the container
	/// </summary>
	public class PageProvider : IPageProvider
	{
		public PageProvider(IServiceLocator servLocator)
		{
			_serviceLocator = servLocator;
		}
		private IServiceLocator _serviceLocator;
		
		#region IPageProvider Members

		public Page Resolve(string name)
		{
			return _serviceLocator.Resolve<Page>(name);
		}

		public bool CanResolve(string name)
		{
			return _serviceLocator.CanResolve(name);
		}

		#endregion
	}
}
